// log.go
package restsrv

import (
	"net/http"
)

func Logger(inner http.Handler, name string) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		//start := time.Now()

		inner.ServeHTTP(w, r)
		/*
			fmt.Printf(
				"\n%s\t%s\t%s\t%s\t from %s\n\n",
				r.Method,
				r.RequestURI,
				name,
				time.Since(start),
				r.RemoteAddr,
			)
		*/
	})
}
